package com.EVO.controller;

import com.EVO.dao.ProvinceDao;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class QueryProviceServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String strProid = request.getParameter("proid");
        String name = "";
        if(strProid != null && !"".equals(strProid.trim())){
            ProvinceDao dao = new ProvinceDao();
            name = dao.getProvinceName(Integer.valueOf(strProid));
        }
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out = response.getWriter();
        out.print(name);
    }
}
